
#include "Context.h"

// constructor
Context::Context(DiscountStrategy* strategy)
    : strategy_(strategy)
{

}

Context::~Context()
{
  delete strategy_;
  strategy_ = nullptr;
}

double Context::PriceAfterDiscount(double original_price)
{
  return strategy_->DoDiscount(original_price);
}
